<?php
	ini_set('display_errors', true);
	error_reporting(E_ALL);
	require 'database.php';
	
	if (isset($_GET['id'])) {
		$databaseLagre = new database();
		$info = array();
		$info['id'] = $_GET['id'];
		$info['adresse'] = $_GET['adresse'];
		$info['vlan'] = $_GET['vlan'];
		$info['beskrivelse'] = $_GET['beskrivelse'];
		$info['subnett'] = $_GET['subnett'];
		$info['gateway'] = $_GET['gateway'];
		$info['dns_oppforing'] = $_GET['dns_oppforing'];
		$info['plassering'] = $_GET['plassering'];
		$info['type'] = $_GET['type'];
		$info['diverse'] = $_GET['diverse'];
		
		if ($databaseLagre->lagreIpAdresse($info))
			return $_GET['vlan'];
	}
?>